#include <QtGui/QApplication>
#include "MainWindow.h"
#include "mythread.h"

#include <QThread>



int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
    MyThread th1;
    sleep (1);
    MyThread th2;
    MainWindow w;

    QObject::connect(&th1, SIGNAL (changed (int)), &w, SLOT(update1 (int )));
    QObject::connect(&th2, SIGNAL (changed (int)), &w, SLOT(update2 (int )));

    w.show();
    th1.start(QThread::LowestPriority);
    th2.start(QThread::HighestPriority);
    return a.exec();

    th1.exit();
    th2.exit();
}
